/* Copyright 2003, 2008 Gregor Hohpe (http://www.eaipatterns.com) */

namespace MessageGateway
{
    using System.Xml;

    public delegate void OnMsgEvent(XmlDocument msg);

    /* Generic interface to receive an XML message. 
     * A messaging gateway implementation realizes this interface.
     */
    public interface IMessageReceiver
    {
        void AddEventHandler(OnMsgEvent handler); 

        void Activate();
    }

    /* Generic interface to send an XML message
     * A messaging gateway implementation realizes this interface.
     */
    public interface IMessageSender
    {
        void Send(XmlDocument msg);
    }

}